//
//  GM_UIViewController.swift
//  SWIFT_LEARN
//
//  Created by youxin on 2018/1/16.
//  Copyright © 2018年 YST. All rights reserved.
//

import UIKit

class GM_UIViewController: UIViewController {
    
   // var view1 : UIView! = nil;
    let view1 : UIView = UIView()

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        self.creatUI()
    }
    
    func creatUI()  {
        self.creatView()
    }
    
    func creatView() {
        
        // view1  = UIView()
        view1.frame = CGRect(origin:CGPoint(x:100,y:100) ,size:(CGSize(width:100,height:100)));
        view1.backgroundColor = UIColor.red
        self.view.addSubview(view1)
        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
